<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>011vue中的表单绑定</title>
  <script src="./vue.js"></script>
</head>
<body>
  <div id="root">
     <input type="text" v-model="value">{{value}}
     <div>
       <textarea v-model="value">{{value}}</textarea>
     </div>
     <div>
       <input type="checkbox" v-model="value">{{value}}
     </div>
     <div>
      <input type="radio" v-model="value" value="test">{{value}}
     </div>
     <div>
       <select v-model="valueSlt">
         <option disabled>----请选择----</option>
         <option value="1">A</option>
         <option value="2">B</option>
         <option value="3">C</option>
       </select>
       {{valueSlt}}
     </div>
     <h6>表单修饰符</h6>
     <div>
       <input type="text" v-model.lazy="valueDec">{{valueDec}}
       <input type="text" v-model.number="valueDecNum">{{valueDecNum}}
     </div>
  </div>
  <script>
    
    var vm = new Vue({
      el: "#root",
      data: {
        value: "",
        valueSlt: "",
        valueDec: "",
        valueDecNum: ""
      },
      methods: {
        
      },
      watch: {
        valueDecNum: function() {
          console.log(typeof this.valueDecNum);
        }
      }
    })
  </script>
</body>
</html>